package cn.layku.order.controller;

import cn.layku.order.util.ApiResult;
import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class OrderController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 创建订单
     */
    @PostMapping("/order/create")
    public ApiResult<Object> create(@RequestBody Map<String, Object> map) {
        logger.info("创建订单参数->{}", JSON.toJSONString(map));
        return ApiResult.successResult("创建订单成功");
    }

}
